<template>
	<view class="cu-custom" style="height:168rpx">
	  <view :class="[bgColor,'cu-bar fixed']" style="height:168rpx;padding-top:88rpx;">
	    <view class="action" @click="BackPage" v-if="isBack">
	      <text class="cuIcon-back"></text>
	      <slot name="backText"></slot>
	    </view>
	   <view v-if="isCustom" class="action border-custom" style="height:64rpx;width:174rpx;margin-left:14rpx">
	   	      <text class="cuIcon-back" @click="BackPage"></text>
	   	      <text class="cuIcon-homefill" @click="toHome"></text>
	   	</view>
	    <view class="content" style="top:44px">
	      <slot name="content"></slot>
	    </view>
	    <slot name="right"></slot>
	  </view>
	</view>
</template>

<script>
	export default {
		name:"hxt-custom",
		props: {
		    bgColor: {
		      type: String,
		      default: ''
		    }, 
		    isCustom: {
		      type: [Boolean, String],
		      default: false
		    },
		    isBack: {
		      type: [Boolean, String],
		      default: false
		    },
		    bgImage: {
		      type: String,
		      default: ''
		    },
		  },
		data() {
			return {
				
			};
		},
		methods: {
		    BackPage() {
		      wx.navigateBack({
		        delta: 1
		      });
		    },
		    toHome(){
		      wx.reLaunch({
		        url: '/pages/index/index',
		      })
		    }
		  }
	}
</script>

<style>

</style>
